<layout name="mun" />
    <div class="operation_user clearfix">
        <div class="link fl"><a href="#">商城</a><span>&gt;&gt;</span><a href="#">分类管理</a><span>&gt;&gt;</span>添加分类</div>
        <div class="link fr">
            <a href="#" class="icon icon_i">首页</a><span></span>欢迎您！<span>Admin</span><a href="#" class="icon icon_e">退出</a>
        </div>
    </div>
    <div class="content clearfix">
        <div class="main">
            <!--右侧内容-->
            <div class="cont">
                <div class="title">添加分类</div>
                <div class="details">
                	<div class="formDiv">
					  <div class="form-group">
					    <label for="userName" class="col-sm-2 control-label">添加分类</label>
					    <div class="col-sm-10">
					      <input type="text" class="form-control" id="cName" placeholder="添加分类">
					    </div>
					  </div>
					  <div class="form-group">
					    <div class="col-sm-offset-2 col-sm-10">
					      <button id="tijiao" class="btn btn-primary">提交</button>
					    </div>
					  </div>
					</div>
                </div>
            </div>
        </div>
               <SCRIPT src="__JS__jquery-1.9.1.min.js" type="text/javascript"></SCRIPT>
        <script type="text/javascript">
        $(function(){
        	$('#tijiao').click(function(){
        		if($("#cName").val() != ""){
		        		$.post("{:U('AddSortlist/addData')}",{
		        			cName:$("#cName").val()
			        		},function(data){
			        			if(data.status == 0){
			        				alert(data.info);
			        			}else{
			        				alert(data.info);
			        				location.href=data.url; 
			        			}
		        		});
        		}else{
        			alert("不能为空");
        		}
        	});
        });
        </script>
        
